<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			function exer(){
				if(arguments.length==1){
					return Math.pow(arguments[0],2); 
				}else if(arguments.length==2){
					return (arguments[0]+arguments[1]);
				}
			}
			
			console.log("传入两个参数时:"+exer(8,10));
			console.log("传入一个参数时:"+exer(8));
			
		</script>
	</body>
</html>
